home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / sethostname / sethostname.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-02  |  882 b   |  33 lines

  1. /* 
  2.  * sethostname.c --
  3.  *
  4.  *    Sets the host name in the kernel.
  5.  *
  6.  * Copyright 1992 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that this copyright
  10.  * notice appears in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  */
  15.  
  16. #ifndef lint
  17. static char rcsid[] = "$Header: /sprite/lib/forms/RCS/proto.c,v 1.6 92/03/02 15:29:56 bmiller Exp $ SPRITE (Berkeley)";
  18. #endif /* not lint */
  19.  
  20. #include <stdio.h>
  21.  
  22. main(argc, argv) 
  23.     int        argc;
  24.     char    **argv;
  25. {
  26.     if (argc != 2) {
  27.     fprintf(stderr, "Usage: sethostname name\n");
  28.     exit(1);
  29.     }
  30.     return sethostname(argv[1], strlen(argv[1]));
  31. }
  32.  
  33.